﻿using System;
using BHS.TFSChangsetAnalyser.Export;
using Microsoft.Win32;

namespace BHS.TFSChangsetAnalyser.View
{
    public class SaveDialog : IExportFilenameProvider
    {
        public string GetExportFilename()
        {
            SaveFileDialog dialog = new SaveFileDialog();
            dialog.Filter = "XML File (*.xml)|*.xml";
            dialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            
            if (dialog.ShowDialog() == true)
            {
                return dialog.FileName;
            }

            return null;
        }
    }
}
